package com.huawei.hwCloudJs.service.locationapi;

import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.Context;
import com.huawei.hwCloudJs.api.ILocDialog;
import com.huawei.hwCloudJs.api.ILocDialog.DialogResult;
import com.huawei.hwCloudJs.d.e;

public class DefaultPermissionDlg implements ILocDialog {
    private final String a = "DefaultPermissionDlg";
    private Dialog b;

    public Dialog genDialog(Context context, String str, DialogResult dialogResult) {
        Builder builder = new Builder(context);
        builder.setTitle(e.b(context, "jssdk_permission_location_title"));
        builder.setMessage(String.format(context.getResources().getString(e.b(context, "jssdk_permission_location_msg")), new Object[]{str}));
        builder.setPositiveButton(e.b(context, "jssdk_permission_allow"), new 1(this, dialogResult));
        builder.setNegativeButton(e.b(context, "jssdk_permission_forbidden"), new 2(this, dialogResult));
        this.b = builder.create();
        return this.b;
    }
}
